const login = require('./login/index');
const register = require('./register/index');
const getAllActivity = require('./getAllActivity/index')
const getActivity = require('./getActivity/index')
const updatePeople = require('./updatePeople/index')
const getAll = require('./getAll/index')
const getCollect = require('./getCollect/getCollect')
const signPeopleMess = require('./signPeopleMess/index')
const cancelCollect = require('./cancelCollect/cancelCollect')
const updateScore = require('./updateScore/updateScore')
const myJoin = require('./myJoin/myJoin')
const updateEvent = require('./updateEvent/updateEvent')
const updateStatus = require('./updateStatus/index')
// 云函数入口函数
exports.main = async (event, context) => {
  switch (event.type) {
    case 'login':
      return await login.main(event, context);
    case 'register':
      return await register.main(event, context);
    case 'getAllActivity':
      return await getAllActivity.main(event, context);
    case 'getActivity':
      return await getActivity.main(event, context);
    case 'updatePeople':
      return await updatePeople.main(event, context);
    case 'getAll':
      return await getAll.main(event, context);
    case 'getCollect':
      return await getCollect.main(event, context);
    case 'signPeopleMess':
      return await signPeopleMess.main(event, context);
    case 'cancelCollect':
      return await cancelCollect.main(event, context);
    case 'updateScore':
      return await updateScore.main(event, context);
    case 'myJoin':
      return await myJoin.main(event, context);
    case 'updateEvent':
    return await updateEvent.main(event, context);
    case 'updateStatus':
      return await updateStatus.main(event, context);
  }
};